package com.maistars.spider.service.process.html;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;

/**
 * @author dhr
 * @date 2021/1/30 上午12:56
 */
@Data
public class HtmlProcessorConfig {

    private String orignalConfig;

    private JSONObject processorConfig;

    public HtmlProcessorConfig(String config){
        this.orignalConfig = config;
        processorConfig = JSON.parseObject(orignalConfig);
    }

    public HtmlProcessorConfig(JSONObject processorConfig){
        this.processorConfig = processorConfig;
        this.orignalConfig = processorConfig.toJSONString();
    }

}
